package OopInterface;

public class Test {
    public static void main(String[] args) {
        Frog f = new Frog("小绿绿",4);
        System.out.println(f.getName()+ " , " +f.getAge());
        f.eat();
        f.swim();

        Rabbit r = new Rabbit("小白",2);
        System.out.println(r.getName()+ " , " +r.getAge());
        r.eat();

        Dog d = new Dog("小黑",2);
        System.out.println(d.getName()+ " , " +d.getAge());
        d.eat();
        d.swim();
    }
}
